var mongoose = require('mongoose')
var Schema = mongoose.Schema;

var roomCodeSchema = new Schema({
    "_m":{
        //create time
        // modify time
        type:Object,
    },
    "problem_id":{
        type: Schema.Types.ObjectId, 
        ref:'problems',
        required: true
    },
    "user_id":{
        type: Schema.Types.ObjectId, 
        ref:'users_datas',
        required: true
    },
    "room_id":{
        type: Schema.Types.ObjectId, 
        ref:'rooms',
        required: true
    },
    "code":{
        type:String,
        default:""
    }
});
module.exports = roomCodeSchema;